package com.example.dynamic_forms.client;

import java.util.ArrayList;

import com.example.dynamic_forms.client.User;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface GreetingServiceAsync {
	public void authenticateUser(String user1, String pass1,
			AsyncCallback<String> callback);
	public void getBasicInfo(String eid,
			AsyncCallback<String> callback);
	public void insertUser(String uname, String passwd, String sec_q, String sec_ans, AsyncCallback callback);
	
	public void insertPatient(String chartID, String EMPI, String Lname,
			String Fname, String Gender, String DOB, String AdmnDate,
			String Race, int ht, int wt, String nicotine,
			String PendLitGn, String wrkComp,
			String UserName, AsyncCallback<String> callback);
	
	public void insertMiscData(String table_name, String EMPI, String col, String val, AsyncCallback<User> callback);

	public void insertImageData(String image_date, String image_type, int body_part, String EMPI, String username, AsyncCallback<String> callback);

	public void insertImageInterpretationData( int image_ID, int operation_detail_ID ,String image_months, String overall_fusion, int overall_score, String username, AsyncCallback<String> callback);

	public void insertImageView (int image_ID, String classification, String username, AsyncCallback<String> callback);
	
	public void insertForm(String form_name,String date_created ,String creator ,String form_modified ,AsyncCallback<String> callback);
	
	public void insertFormField(int form_id,int formfield_id ,String question,String form_name ,String datatype ,String defaultVal,int multiVal ,String flg, String reftbl, String refattri, AsyncCallback<String> callback);
	
	public void insertOperation(String eMPI, String procedure_type,
			String surgeon, String procedure_date, String cut_time,
			String close_time, int eBL, String intraOP_complications,
			String complication, String procedure_notes, String username,
			AsyncCallback<String> callback);

	public void insertOpnDetail(String proc_ID, String cageType, int cageHt,
			int cageLordosis, String BMP, String plateType, String screwType,
			String level, String username, AsyncCallback<String> callback);
	
	public void insertReadsData( int interpretation_ID, String fusion, int score, String left, String right, String center, String reader, String Username, AsyncCallback<String> callback);

	public void insertFormFieldAddorDel(int form_id,int formfield_srno_add ,int form_modified_id, AsyncCallback<User> callback);

	public void insertOptions(int formfield_srno,String option,AsyncCallback<User> callback);
	
	public void updateTabledefination(String tbl_name, String cardinality, String uniqueattrinm, String reltable, String relattri, String relationshipName, AsyncCallback<User> callback);

	public void insertData(String formnm, String EMPI, String[] col, String[] val, AsyncCallback<User> callback);
	
	public void selectOperation(String EMPI, String procDate,
			AsyncCallback<String> callback);
	
	public void selectImage(String EMPI, String image_date,AsyncCallback<String> callback);
	
	public void getFormNames(AsyncCallback<String> callback);
	
	public void getPatNames(AsyncCallback<String> callback);
	
	public void getEMPI(String patname, AsyncCallback<String> callback);
	
	public void selectOperationDetail(String EMPI, String username, AsyncCallback<String> callback);
	
	public void selectImageInterID(int operation_detail_ID, int image_ID, AsyncCallback<String> callback);
	
	public void selectFormId(String form_name, AsyncCallback<String> callback);
	
	public void selectModifiedFormId(String form_modified, AsyncCallback<String> callback);
	
	public void selectFormFieldSno(int form_id,int formfield_id ,String question, AsyncCallback<String> callback);
	
	public void selectTableNames(AsyncCallback<ArrayList> callback);
	public void selectAttributeNames(String table_name, AsyncCallback<ArrayList> callback);
	
	public void selectprimkey(String tbl_nm, AsyncCallback<String> callback);
	
	public void getFormId(String username, String form_name, AsyncCallback<String> callback);
	
	public void getFormfieldDetails(int form_id, int mod_form_id, AsyncCallback<String> callback);
	
	public void getPKFK(ArrayList<String> selectedTbl, AsyncCallback<ArrayList<ArrayList>> callback);
	public void getQueryResult(String Query, AsyncCallback<ArrayList<ArrayList<String>>> callback);
	
	public void saveQuery(String uname, String queryToSave, String DBname, AsyncCallback<User> callback);
	public void getKeys(ArrayList<ArrayList<String>> selectedTbls, AsyncCallback<ArrayList<ArrayList>> callback);
	}
